Title Banner

Previous Book Contents Book Index Next

Inside Macintosh: QuickTime Components /
Chapter 6 - Sequence Grabber Channel Components / Sequence Grabber Channel Components Reference
Functions / Configuration Functions for Video Channel Components


SGSetVideoCompressor

The SGSetVideoCompressor function allows the sequence grabber component to specify many of the parameters that control image compression of the video data captured by your video channel.

pascal ComponentResult SGSetVideoCompressor (SGChannel c, 
                                 short depth,
                                 CompressorComponent compressor,
                                 CodecQ spatialQuality, 
                                 CodecQ temporalQuality, 
                                 long keyFrameRate);
c
Identifies the channel connection for this operation.
depth
Specifies the depth at which the image is likely to be viewed. Image compressors may use this as an indication of the color or grayscale resolution of the compressed images. If the sequence grabber component sets this parameter to 0, let the sequence grabber component determine the appropriate value for the source image. Values of 1, 2, 4, 8, 16, 24, and 32 indicate the number of bits per pixel for color images. Values of 33, 34, 36, and 40 indicate 1-bit, 2-bit, 4-bit, and 8-bit grayscale, respectively, for grayscale images. Your component can determine which depths are supported by a given compressor by examining the compression information record (defined by the CodecInfo data type) returned by the Image Compression Manager's GetCodecInfo function (see the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for more information on the GetCodecInfo function).
compressor
Specifies the image compressor identifier. The sequence grabber component may specify a particular compressor by setting this parameter to its compressor identifier. You can obtain these identifiers from the Image Compression Manager's GetCodecNameList function.
spatialQuality
Specifies the desired quality of the compressed image. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for valid values.
temporalQuality
Specifies the desired temporal quality of the sequence. This parameter governs the level of compression the sequence grabber component desires with respect to information in successive frames in the sequence. The sequence grabber component sets this parameter to 0 to prevent the image compressor from applying temporal compression to the sequence. See the chapter "Image Compression Manager" in Inside Macintosh: QuickTime for other valid values.
keyFrameRate
Specifies the maximum number of frames allowed between key frames. Key frames provide points from which a temporally compressed sequence may be decompressed. The sequence grabber component uses this parameter to control the frequency with which the image compressor places key frames into the compressed sequence. For more information about key frames, see the chapter "Image Compression Manager" in Inside Macintosh: QuickTime.
The compressor determines the optimum placement for key frames based upon the amount of redundancy between adjacent images in the sequence. Consequently, the compressor may insert key frames more frequently than you have requested. However, the compressor will never place key frames less often than is indicated by the setting of the keyFrameRate parameter. The compressor ignores this parameter if you have not requested temporal compression (that is, you have set the temporalQuality parameter to 0).
RESULT CODES
paramErr-50Invalid parameter
cantDoThatInCurrentMode-9402Request invalid in current mode
notEnoughMemoryToGrab-9403Insufficient memory for record operation
deviceCantMeetRequest-9408Device cannot support grabber

Previous Book Contents Book Index Next

© Apple Computer, Inc.
7 JUL 1996




Navigation graphic, see text links

Main | Top of Section | What's New | Apple Computer, Inc. | Find It | Feedback | Help